<!doctype html>
<html lang="zh">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <link rel="icon" href="../dist/img/favicon-32x32.png" sizes="32x32" type="image/png">
    <link rel="icon" href="../dist/img/favicon-16x16.png" sizes="16x16" type="image/png">
    <meta name="keywords" content="响应式后台模板,开源免费后台模板,Bootstrap5后台管理系统模板">
    <meta name="description" content="Bootstrap-Admin基于bootstrap5的免费开源的响应式后台管理模板">
    <meta name="author" content="ajiho">
    <link rel="stylesheet" href="../plugins/bootstrap-icons/font/bootstrap-icons.css">
    <link rel="stylesheet" href="../plugins/bootstrap/dist/css/bootstrap.min.css">
    <link rel="stylesheet" href="../dist/css/bootstrap-admin.min.css">
    <link rel="stylesheet" href="../plugins/bootstrap-table/dist/bootstrap-table.min.css">
    <title>Bootstrap-Admin - 开源免费响应式后台管理系统模板</title>
</head>

<body class="bg-light pt-2">
<div class="container-fluid">
    <div class="card border-0 shadow-sm">
        <div class="card-body">
            <table id="table"></table>
        </div>
    </div>
</div>

<script src="../plugins/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
<script src="../dist/js/bootstrap-admin.min.js"></script>
<script src="../plugins/jquery/dist/jquery.min.js"></script>
<script src="../plugins/bootstrap-table/dist/bootstrap-table.min.js"></script>
<script>


    /**
     * columns表示列，里面的对象 title是表头信息，field是服务端返回的字段名称
     */
    $('#table').bootstrapTable({
        //列
        columns: [
            {
                field: 'id',
                title: 'Item ID'
            },
            {
                field: 'name',
                title: 'Item Name'
            },
            {
                field: 'price',
                title: 'Item Price'
            }
        ],
        //数据
        data: [
            {
                id: 1,
                name: 'Item 1',
                price: '$1'
            },
            {
                id: 2,
                name: 'Item 2',
                price: '$2'
            }
        ]
    })
</script>
</body>
</html>